package com.fowo.api.model.purchase.order.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import javax.validation.constraints.*;
import lombok.Data;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.common.excel.ImageConvert;
import java.util.List;
import com.fowo.api.common.validator.EnumsString;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.format.DateTimeFormat;

/** 采购订单子表 导入导出辅助模型 */
@Data
public class PurchaseOrderProductExcelPo {
@Size(max = 500, message = "图片长度不能超过20")
    @ExcelProperty(value = "图片",converter = ImageConvert.class)
    private List<SysFile> picUrl;

@EnumsString(value = {"已变更", "已退货", "已换货"}, message = "业务标识的可用值为 “已变更”, “已退货”, “已换货” 其中之一")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "业务标识")
    private String businessIdent;

@NotNull(message = "产品不能为空")
@Size(max = 50, message = "产品长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "*产品")
    private String productIdName;

@ExcelIgnore
    @ExcelProperty(value = "*产品")
    private Long productId;

@Size(max = 50, message = "SKU长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "SKU")
    private String sku;

@Size(max = 50, message = "店铺长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "店铺")
    private String sidShopName;

@ExcelIgnore
    @ExcelProperty(value = "店铺")
    private Long sid;

@Size(max = 50, message = "FNSKU长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "FNSKU")
    private String fnskuFnsku;

@ExcelIgnore
    @ExcelProperty(value = "FNSKU")
    private Long fnsku;

@Size(max = 50, message = "型号长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "型号")
    private String model;

@NotNull(message = "采购数量不能为空")
@Size(max = 50, message = "采购数量长度不能超过20")
    @ExcelProperty(value = "*采购数量")
    private Integer applicationNum;

@Size(max = 50, message = "含税单价长度不能超过20")
    @ExcelProperty(value = "含税单价")
    private java.math.BigDecimal taxPrice;

@NotNull(message = "单价不能为空")
@Size(max = 50, message = "单价长度不能超过20")
   @NumberFormat("0.0000")
    @ExcelProperty(value = "*单价")
    private java.math.BigDecimal unitPrice;

@NotNull(message = "成本价格不能为空")
   @NumberFormat("0.0000")
    @ExcelProperty(value = "*成本价格")
    private java.math.BigDecimal costPrice;

   @NumberFormat("0.000")
    @ExcelProperty(value = "主材料单价")
    private java.math.BigDecimal mainUnitPrice;

   @NumberFormat("0.000")
    @ExcelProperty(value = "主材料克重")
    private java.math.BigDecimal gramWeight;

   @NumberFormat("0.000")
    @ExcelProperty(value = "工费")
    private java.math.BigDecimal laborCosts;

   @NumberFormat("0.000")
    @ExcelProperty(value = "辅料")
    private java.math.BigDecimal accessoriesPrice;

    @ExcelProperty(value = "税率")
    private java.math.BigDecimal taxRate;

    @ExcelProperty(value = "税额")
    private java.math.BigDecimal taxAmount;

@Size(max = 50, message = "金额长度不能超过20")
   @NumberFormat("0.0000")
    @ExcelProperty(value = "金额")
    private java.math.BigDecimal totalPrice;

@Size(max = 50, message = "价税合计长度不能超过20")
    @ExcelProperty(value = "价税合计")
    private java.math.BigDecimal amount;

@Size(max = 50, message = "到货量长度不能超过20")
    @ExcelProperty(value = "到货量")
    private Integer quantityReceived;

@Size(max = 50, message = "待到货量长度不能超过20")
    @ExcelProperty(value = "待到货量")
    private Integer quantityReceive;

@Size(max = 50, message = "退货量长度不能超过20")
    @ExcelProperty(value = "退货量")
    private Integer quantityReturn;

@Size(max = 50, message = "预计到货时间长度不能超过20")
@DateTimeFormat("yyyy年MM月dd日")
    @ExcelProperty(value = "预计到货时间")
    private java.util.Date expectArriveTime;

@Size(max = 50, message = "到货日期长度不能超过20")
@DateTimeFormat("yyyy年MM月dd日")
    @ExcelProperty(value = "到货日期")
    private java.util.Date arrivalDate;

@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "所属采购订单")
    private String purchaseOrderIdPurchaseOrderCode;

@ExcelIgnore
    @ExcelProperty(value = "所属采购订单")
    private Long purchaseOrderId;

@Size(max = 50, message = "备注长度不能超过20")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, dataFormat = 49)
    @ExcelProperty(value = "备注")
    private String remarks;

    @ExcelProperty(value = "本店铺的库存")
    private Long localShopInventory;

    @ExcelProperty(value = "其他店铺的库存")
    private Long otherShopInventory;

    @ExcelProperty(value = "公共的库存")
    private Long publicInventory;

    @ExcelProperty(value = "3天销量")
    private Long threeSalesVolume;

    @ExcelProperty(value = "7天销量")
    private Long sevenSalesVolume;

    @ExcelProperty(value = "30天销量")
    private Long thirtySalesVolume;

@Size(max = 50, message = "同期销量长度不能超过20")
    @ExcelProperty(value = "同期销量")
    private Long sameSales;

}
